package com.jiezhuo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author com.jiezhuo
 * @since 2022-09-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="IotData对象", description="")
@TableName("sys_iot_data")
public class IotData implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.ID_WORKER)
    private String id;

    private String deviceId;

    @ApiModelProperty(value = "权重（用于排序 可以是负数）")
    private Double weight;

    @ApiModelProperty(value = "名称")
    private String name;
    @ApiModelProperty(value = "从机名称")
    private String slaveName;
    @ApiModelProperty(value = "蓄电池温度")
    private String unit;

    @ApiModelProperty(value = "类型：0：数值型 1：开关型 3：定位性 4：字符型")
    private Integer type;

    @ApiModelProperty(value = "公式")
    private String formula;

    @ApiModelProperty(value = "存储")
    private Integer store;

    @ApiModelProperty(value = "数据类型")
    @TableField("valueKind")
    private Integer valuekind;

    @ApiModelProperty(value = "可见权限 0 不可见 1 可见 默认可见")
    @TableField("permissionShow")
    private Integer permissionshow;

    @ApiModelProperty(value = "	可操作权限 0 不可操作 1 可操作 默认可见")
    @TableField("permissionOp")
    private Integer permissionop;

    @ApiModelProperty(value = "数据值")
    private String value;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    @TableField("updateTime")
    private Date updatetime;


}
